﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace JibberJabber.PartDesigners
{
    public partial class QuestionDesigner : PartDesigner
    {
        public QuestionDesigner()
        {
            InitializeComponent();
        }

        public override Type[] AllowedChildren
        {
            get
            {
                return new Type[] { typeof(QuestionOptionDesigner) };
            }
        }

        public override string StartXml
        {
            get
            {
                return "<part type=\"Question\" speaker=\""
                    + cmbSpeaker.Text + "\">\n"
                    + "<text><![CDATA[" + txtQuestion.Text
                    + "]]></text>\n<options>";
            }
        }

        public override string EndXml
        {
            get
            {
                return "</options>\n</part>\n";
            }
        }
    }
}
